<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>PintarOS: include/transmission.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">PintarOS
   </div>
   <div id="projectbrief">Operating System for Smart Card</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">transmission.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="transmission_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00010"></a><span class="lineno"><a class="code" href="transmission_8h.html#ad4d796b98c583d49e83adabd74a63bf6">   10</a></span>&#160;<span class="preprocessor">#define MAX_BUFFER_SIZE 255 </span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor"></span><span class="comment">/*****************************/</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">/*        Enumeration        */</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">/*****************************/</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="code" href="transmission_8h.html#a284b4a9e63d48cd157962b2447516b82">   19</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;{</div>
<div class="line"><a name="l00021"></a><span class="lineno"><a class="code" href="transmission_8h.html#a284b4a9e63d48cd157962b2447516b82a7c2d86b6055480bd86bece1f6e5af208">   21</a></span>&#160;        <a class="code" href="transmission_8h.html#a284b4a9e63d48cd157962b2447516b82a7c2d86b6055480bd86bece1f6e5af208" title="Using T0 Protocol. ">T0</a>,     </div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="code" href="transmission_8h.html#a284b4a9e63d48cd157962b2447516b82a623238751deb7764bdebf4799fe30f07">   22</a></span>&#160;        <a class="code" href="transmission_8h.html#a284b4a9e63d48cd157962b2447516b82a623238751deb7764bdebf4799fe30f07" title="Using T1 Protocol. ">T1</a>,     </div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;} <a class="code" href="transmission_8h.html#a284b4a9e63d48cd157962b2447516b82" title="Transmission protocol enumeration. ">t_proto</a>;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="code" href="transmission_8h.html#a5266b5ad080839acc7a5223b0ca0e1b5">   28</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;{</div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="code" href="transmission_8h.html#a5266b5ad080839acc7a5223b0ca0e1b5a86d7bec7ffa5d95b1b73c494821e567f">   30</a></span>&#160;        <a class="code" href="transmission_8h.html#a5266b5ad080839acc7a5223b0ca0e1b5a86d7bec7ffa5d95b1b73c494821e567f" title="Baudrate 9.600 bit/s. ">B9600</a>,  </div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="code" href="transmission_8h.html#a5266b5ad080839acc7a5223b0ca0e1b5af975fbd1b044c9494e3b8bc23c746560">   31</a></span>&#160;        <a class="code" href="transmission_8h.html#a5266b5ad080839acc7a5223b0ca0e1b5af975fbd1b044c9494e3b8bc23c746560" title="Baudrate 19.200 bit/s. ">B19200</a>, </div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="code" href="transmission_8h.html#a5266b5ad080839acc7a5223b0ca0e1b5accba157b6983e9577b802caa11c3f3a5">   32</a></span>&#160;        <a class="code" href="transmission_8h.html#a5266b5ad080839acc7a5223b0ca0e1b5accba157b6983e9577b802caa11c3f3a5" title="Baudrate 38.400 bit/s. ">B38400</a>, </div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="code" href="transmission_8h.html#a5266b5ad080839acc7a5223b0ca0e1b5acc2daa508b31c15a10d5c8e33a3ef533">   33</a></span>&#160;        <a class="code" href="transmission_8h.html#a5266b5ad080839acc7a5223b0ca0e1b5acc2daa508b31c15a10d5c8e33a3ef533" title="Baudrate 111.600 bit/s. ">B111600</a> </div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;} <a class="code" href="transmission_8h.html#a5266b5ad080839acc7a5223b0ca0e1b5" title="Transmission Baudrate enumeration. ">t_baudrate</a>;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="comment">/********************************/</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="comment">/*        Data Structure        */</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="comment">/********************************/</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="code" href="structt__config__struct.html">   43</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;{</div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="code" href="structt__config__struct.html#a4664223c90c66c30c150e6067d93e3ba">   45</a></span>&#160;        <a class="code" href="transmission_8h.html#a284b4a9e63d48cd157962b2447516b82" title="Transmission protocol enumeration. ">t_proto</a>         <a class="code" href="structt__config__struct.html#a4664223c90c66c30c150e6067d93e3ba" title="transmission protocol to use : T0 (0) or T1 (1) ">protocol</a>;       </div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="code" href="structt__config__struct.html#a6f883ef7a01ffcee9cf92e0a29509204">   46</a></span>&#160;        <a class="code" href="transmission_8h.html#a5266b5ad080839acc7a5223b0ca0e1b5" title="Transmission Baudrate enumeration. ">t_baudrate</a>      <a class="code" href="structt__config__struct.html#a6f883ef7a01ffcee9cf92e0a29509204" title="speed (baudrate) of the transmission ">baudrate</a>;       </div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;} <a class="code" href="structt__config__struct.html" title="structure of transmission configuration ">t_config_struct</a>;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="code" href="structt__buffer__struct.html">   52</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;{</div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="code" href="structt__buffer__struct.html#acdf8461902e2a0818c319b4c02f07604">   54</a></span>&#160;        <a class="code" href="pintaros_8h.html#aaf0f0cca584c8202c7ee0f4a368bdd50" title="unsigned integer 8-bit ">uint8_t</a> buffer[<a class="code" href="transmission_8h.html#ad4d796b98c583d49e83adabd74a63bf6" title="Maximum size for transmission buffer */. ">MAX_BUFFER_SIZE</a>];   </div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="code" href="structt__buffer__struct.html#aa24dc3533f275eeb702a381dd22ecf02">   55</a></span>&#160;        <a class="code" href="pintaros_8h.html#aaf0f0cca584c8202c7ee0f4a368bdd50" title="unsigned integer 8-bit ">uint8_t</a> <a class="code" href="structt__buffer__struct.html#aa24dc3533f275eeb702a381dd22ecf02" title="length of buffer used ">length</a>;                    </div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;} <a class="code" href="structt__buffer__struct.html" title="structure of transmission buffer ">t_buffer_struct</a>;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="comment">/**************************/</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="comment">/*        Variable        */</span></div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="comment">/**************************/</span></div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="code" href="transmission_8h.html#aadee74ae5233b517f258a1919adc6b40">   62</a></span>&#160;<a class="code" href="structt__config__struct.html" title="structure of transmission configuration ">t_config_struct</a>         <a class="code" href="transmission_8h.html#aadee74ae5233b517f258a1919adc6b40" title="transmission configuration ">tconfig</a>;                    </div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="code" href="transmission_8h.html#a44fa5815cec6ce2c305d2b112d7f0479">   63</a></span>&#160;<a class="code" href="structt__buffer__struct.html" title="structure of transmission buffer ">t_buffer_struct</a>         <a class="code" href="transmission_8h.html#a44fa5815cec6ce2c305d2b112d7f0479" title="buffer for Rx transmission ">rx_buffer</a>;                  </div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="code" href="transmission_8h.html#adb01de2ad4f205ab9dce5a3fa68689c2">   64</a></span>&#160;<a class="code" href="structt__buffer__struct.html" title="structure of transmission buffer ">t_buffer_struct</a>         <a class="code" href="transmission_8h.html#adb01de2ad4f205ab9dce5a3fa68689c2" title="buffer for Tx transmission ">tx_buffer</a>;                  </div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="keyword">extern</span> <a class="code" href="pintaros_8h.html#ad097ffa75536dc17a0039dfb3781d705" title="unsigned integer 16-bit ">uint16_t</a>                <a class="code" href="transmission_8h.html#afc9a91164387a3937d037c76adc8d59b" title="length of command data expected by command interpreter ">exp_data</a>;                </div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">bool</span>                    <a class="code" href="transmission_8h.html#ab910ab91409cf0f0e246a59d92a4d183" title="indication for transmission protocol if the main loop still busy ">busy_flag</a>;               </div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="comment">/**************************/</span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="comment">/*        Function        */</span></div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="comment">/**************************/</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="keywordtype">int</span> <a class="code" href="transmission_8h.html#ac85e578e6bc21cacc03b398d47433e26" title="Initialize the transmission handler. ">transInit</a>(<a class="code" href="structt__config__struct.html" title="structure of transmission configuration ">t_config_struct</a> config);</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="keywordtype">void</span> <a class="code" href="transmission_8h.html#a1de9404b5817c6a4c51eea56c32eedf3" title="Receive the command APDU. ">transRx</a>(); </div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<span class="keywordtype">void</span> <a class="code" href="transmission_8h.html#a8497de52bba7fac4d237d1b534292cde" title="Transmit the response APDU. ">transTx</a>(); </div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jul 10 2013 16:42:56 for PintarOS by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.4
</small></address>
</body>
</html>
